home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1994 January / PSL Monthly Shareware CD-ROM (Public Software Library) (January 1994).iso / games / dos / game_mgt / baskbal.com / SPFIND.DOC < prev   
Encoding:
Text File  |  1988-01-02  |  15.5 KB  |  376 lines

  1.  
  2.  SPFIND, a quick find, Copyright 1987 by Stan Peters
  3.                                        4276-C Wilkie Way, Palo Alto 94306
  4.  
  5. OVERVIEW.
  6.  
  7.         This program works much like other FIND or GREP programs that 
  8.         you may have used.  Enter the program name at the DOS prompt, 
  9.         followed by a string you want to find, and then the file
  10.         specification.
  11.  
  12.         Only with this program, you can enter several strings before the 
  13.         file name.  It will search for all of them on the same pass 
  14.         over the file.
  15.  
  16.         You can also specify that you want to see lines surrounding the 
  17.         match.
  18.  
  19.         Maybe you want a match only if all the search strings are on the 
  20.         line.  SPFIND will do that.
  21.  
  22.         Maybe you want a match only if all of a set of words are within 
  23.         a few lines of each other.  SPFIND will do that.
  24.  
  25.         Maybe you want to know which of a set of documents contain all 
  26.         the words you specify.  The program will do that.
  27.  
  28.         Optionally, the program will add line numbers to the output 
  29.         which can be in "FIND" format or "GREP" format.
  30.  
  31.         Some search programs allow the use of the DOS wildcard
  32.         characters * and ?.  Here, the .  stands for the ? (any
  33.         character).  The * can be done using an 'and' search, e.g.: 
  34.         '-a    first second' approximates 'first*second'.
  35.  
  36.         The program works best on ASCII files, but will work on many text
  37.         type files.  Word processor documents, and probably some 
  38.         database files.
  39.  
  40.         The search is quick.  Not as fast as Chris Dunfords FGREP,
  41.         but three or more times faster than the GREP's I have seen.
  42.         Entering several strings slows SPFIND very little.
  43.  
  44.  
  45. Whats New with SPFND4:
  46.  
  47.  
  48.   |  Bug fixed: SPFND3 had a life span of about 8 hours, there was
  49.   |    a bug, the T option wasn't working.
  50.   |
  51.   |  Bug fixed: When -d (document) is on, search switches were not 
  52.   |    reset with next file, resulting in false matches.     
  53.   |
  54.   |  -t option added, displays results on screen even when output is
  55.   |    is also redirected.
  56.   |
  57.   |  -- More --, a pause added at page breaks.
  58.   |
  59.   |  The or symbol for compound searches is now / , not | , reducing 
  60.   |    the need for double quotes.
  61.   |
  62.  
  63.     Files in the distribuition:
  64.  
  65.         SPF.EXE           The program
  66.         SPFIND.DOC        Program documentation.
  67.         SPF.DAT           A small data file used to illustrate
  68.                            usage of the program.
  69.  
  70.  
  71.     Using the Program;
  72.  
  73.  
  74.      Usage:  spf  [-options] string  [string].... filename 
  75.            Filename may contain ? and *, it may have a path prefix
  76.            You may have 1 to 15 strings.
  77.            A period in the string(s) matches any character.
  78.  
  79.      Entering SPF on the command line, without any parameters will
  80.      give a summary of the options.    
  81.  
  82.      Options must start with a '-'.  Options may be combined in a 
  83.      single term or input individually:  
  84.           spf -w -a -15b
  85.         is identical to:
  86.           spf -wa15b.
  87.      These options are available:
  88.  
  89.          a - 'and', all must be present.    
  90.             All the strings on the command line must be present.
  91.             See below for a discussion of compound searches - you can 
  92.             use the / symbol to get and/or combinations.
  93.  
  94.          b - also search binary files.      
  95.             Binary files are normally skipped in the search.  You 
  96.             usually don't want to search executeable and .ARC files.
  97.             Internally, SPFIND considers a file with 20 characters in 
  98.             the first 512 bytes that are less than a hex 9 to identify a 
  99.             file as 'binary'.  SPFIND works (slowly) on these files.
  100.  
  101.          c - case sensitive search.         
  102.             The default is to ignore case (upper/lower) for letters.
  103.             Use this option to restrict your output.
  104.  
  105.          d - Span entire document, if necessary.
  106.             This option is particularly useful if you want to scan many 
  107.             documents for the presence of a set of words.  When the 
  108.             search criteria has been met, the last occurance of each 
  109.             string will be output and SPFIND will skip to the next 
  110.             file.
  111.  
  112.          f - stop after first find.         
  113.             If you just want to know whether the strings are present in 
  114.             the file(s), use this option.  SPFIND will show the last line 
  115.             in the file that satisfys the search criteria for each 
  116.             string on the command line.
  117.  
  118.          h - strip hi (8) bits.
  119.             Enter this option if you want the hi bit stripped before 
  120.             comparison and output.  Use this option if you 
  121.             are scanning word processor documents (Wordstar, and perhaps 
  122.             others).
  123.  
  124.          l - show line numbers.
  125.             Use this to show line numbers on each output line.  For a "normal"
  126.             ASCII file this should agree with the lines in your document.
  127.             SPFIND advances this count when it detects a CRLF, CR alone,
  128.             or LF alone.  Or when 100 characters have passed without any of the 
  129.             above.  
  130.  
  131.          t - send output to both the screen and a redirected ( > ) file.
  132.             You can capture the results to a file AND see the action on
  133.             the screen.
  134.  
  135.          u - Unix (grep) style output.
  136.             Unix 'grep' style lines will be outputted if you use this 
  137.             option.  Each output line will be prefixed with the name of 
  138.             the file containing the string.  The messages for file being 
  139.             searched, ie "+- filename>" will not appear.  Nor 
  140.             will the "hex file skipped" message appear. 
  141.  
  142.          w - match only if a word.
  143.             A string will be considered a match only if the preceding 
  144.             and following positions does not contain an alpha or numeric 
  145.             character.  For scanning programs, this can be useful to 
  146.             restrict output, eg "-w eof" will not output "sizeof".
  147.  
  148.          a number (from 2 thru 15)
  149.             If you enter a number SPFIND will to two things:
  150.               It will search for a match within a span of lines, that 
  151.                is, all arguments need not occur on the same line.
  152.               When it finds a match, SPFIND will show it centered in the 
  153.                number of lines you have specified.  The set of lines 
  154.                will be follow by this line: "+-+.
  155.               See below for examples.
  156.  
  157.     A SUMMARY of these options will be displayed on the screen if 
  158.        you enter SPF with no parameters.
  159.  
  160.         I have never seen a program that uses a span of lines like this 
  161.         and, in testing it, I have found the output rather odd at
  162.         times.  But the program was operating correctly.  So I have
  163.         included a small file of data (SPF.DAT) so that you can "play"
  164.         with multi-line "and" conditions and get a feel for how it
  165.         works on a simple set of data.  The file contains 20 lines:
  166.  
  167.             SPFIND  demo data
  168.             w1
  169.             w2
  170.             .
  171.             .
  172.             w18
  173.             w19
  174.  
  175.         I suggest you try these:
  176.         
  177.         Enter:                             Comment:
  178.          spf  w1   spf.dat                   - 10 lines output
  179.          spf -w w1 spf.dat                   - 1 line output
  180.          spf -w2 w1 spf.dat                  - 2 lines output, one after
  181.          spf -w3 w1 spf.dat                  - 3 lines output, before 
  182.                                                     and after 
  183.          spf -a2 w1 w2 spf.dat               - 2 lines output
  184.          spf -a5 w4 w6 spf.dat               - 5 lines output
  185.  
  186.         If you want a compound search using a mixed and/or criteria,
  187.         use the / symbol (see examples below).  Enter the -a for an
  188.         "and" search followed by strings that must be there.  Then the
  189.         or conditions, with the terms separated by the /.
  190.  
  191.         Search for w4 and either w5 or w6:
  192.  
  193.          spf -a5 w4  w5/w6  spf.dat          - 5 lines output
  194.  
  195.         Another example.  Search for w7 and either w1 or w5:
  196.  
  197.          spf -a5 w7  w1/w5  spf.dat          - 8 lines output
  198.         
  199.         This time we have two sets that match: the first is for w5 and
  200.         w7, the second is for w7 and w1(1).  Notice that there are only
  201.         three lines printed in the second set.  That is because two of
  202.         its lines have been printed in the set above.
  203.         
  204.         If you want to search for the /, enter the / twice, the double
  205.         slash (//) indicates to SPFIND that this is not an "or".  So if
  206.         you want to search for the date 10/12/85, enter 10//12//85. 
  207.         Search for   ///  ?    Enter each twice - //////.
  208.  
  209.         Earlier versions of SPFIND used double quotes and the vertical
  210.         bar.  But I find my typing errors go up when I enter upper case,
  211.         especially for non-alpha keys.  There are a few instances where
  212.         you will have to use double quotes to define the strings, one 
  213.         being for blanks within the strings.  The other is for those 
  214.         keys that DOS captures:  <, >, and | . 
  215.         Enter "age < 40",   not:    age < 40  .
  216.  
  217.  
  218.         Other examples:
  219.  
  220.          spf -u w1 spf.dat                   - 10 lines output, Unix style
  221.          spf -ad w2 w7 w13 spf.dat           - 3 lines output, and quit
  222.                                                  searching
  223.          spf w1    spf.*                     - DOS wildcards OK in file 
  224.                                                name.  Binary files 
  225.                                                skipped unless you 
  226.                                                specify -b
  227.  
  228.         If you are a user of DISK NAVIGATOR (another of my shareware 
  229.         products) you may be interested in these macros to speed your 
  230.         work:
  231.  
  232.         phon   spf -a4f                         address.fil
  233.             Key in 'phon', press ENTER, key in first and last name,
  234.             and press F4.
  235.  
  236.         doc   spf -wad                           ^DP\*.*
  237.             Key in 'doc', press ENTER,  key in a set of words, and press 
  238.             F4.  All documents in the indicated directory that contain 
  239.             the set of words will be shown.
  240.  
  241.         The above concepts can also be implemented with .BAT files.
  242.  
  243.         Disk Navigator is on Compuserve, PC-Sig and many other places as 
  244.         DNAV13.ARC.
  245.  
  246.          
  247. WARRANTY.
  248.      
  249.     SPFIND IS DISTRIBUITED ON AN "AS IS" BASIS WITHOUT WARRANTY,
  250.     EXPRESS OR IMPLIED.  THE USER IS ADVISED TO TEST THE PACKAGE BEFORE
  251.     RELYING ON IT.  THE USER MUST ASSUME FULL RISK AS TO THE RESULTS
  252.     AND PERFORMANCE OF USING THE PACKAGE.  ANY LIABILITY OF THE AUTHOR
  253.     WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT.  IN NO EVENT
  254.     SHALL THE AUTHOR BE LIABLE FOR ANY DAMAGES ARISING FROM THE USE OR
  255.     INABILITY TO USE THIS PACKAGE.
  256.  
  257. LICENSE.
  258.  
  259.     SPFIND is a copyrighted software that is being distributed as
  260.     shareware.  It is NOT in the public domain.  By using or
  261.     distributing this package, you agree to the conditions presented
  262.     here.
  263.      
  264.     You may use the SPFIND for your own personal use.  If you find it
  265.     useful, you are requested to pay a Registration fee of $10.  You
  266.     may use the program on multiple machines.  Where there is the
  267.     potential for use on multiple machines at the same time, pay for
  268.     additional copies.  If you are using SPFIND in a commercial,
  269.     professional, educational, or governmental organization, you are
  270.     granted a limited license, valid for thirty days, to use this
  271.     package for evaluation purposes; if you continue to use this
  272.     package, you must pay the registration fee.  Operators of bulletin
  273.     board systems that offer public domain programs are exempted from
  274.     payment.
  275.  
  276.  
  277. HOW TO PAY.
  278.  
  279.     The price has been made attractive to encourage users of the
  280.     program to send payment.  For each copy in use send:
  281.  
  282.                                                   5 or more     20 or more
  283.  
  284.         All users:                       $10         $6           $4     
  285.  
  286.     Registered users will be notified by letter of updates to the
  287.     program.  Add $6 if you wish to receive a disk with the latest
  288.     version.  Please indicate the version you are using so I can send a
  289.     refund if you are current.
  290.  
  291.     The idea of shareware with its low cost distribution of quality
  292.     programs is an American Treasure.  Individuals with good ideas can
  293.     afford to implement them.  The authors are talented people that may
  294.     forego salary to implement their ideas.  They are making a bet that
  295.     their efforts will be accepted and that users will respond.  A
  296.     survey has indicated that a very low percentage of users supply
  297.     support.
  298.  
  299.     This is no way to keep the concept alive!
  300.  
  301.     If SPFIND does not fit your needs, please stop and think about what 
  302.     shareware packages you do find useful.  Support those that you use 
  303.     regularly.
  304.  
  305.     Send remittance to:
  306.         Stan Peters
  307.         4276-C Wilke Way 
  308.         Palo Alto, Ca. 94306
  309.  
  310. I will check regularly for messages to me on SPFIND or DISK NAVIGATOR on:
  311.     Compuserve,   my id:   76525,1601
  312.   San Francisco area BBS's  (Stan Peters);
  313.     PDSE  San Mateo:        415 571 6911
  314.     PDSE  Sunnyvale:        408 735 7190
  315.   
  316.  
  317. DISTRIBUTION.                        
  318.     
  319.     You may freely copy this program for friends so long as the three
  320.     files are included unmodified.  Non-profit user groups and bulletin
  321.     boards may also include it in their libraries.
  322.  
  323.     For-profit organizations may distribute it provided there is a 
  324.     PROMINENT statement urging users to support the user supported 
  325.     concept.  This should be in a brief index type (READ.ME?) file that 
  326.     the user accesses to discover the contents of the disk.  If in 
  327.     doubt, write me, showing me how you get the point across to the 
  328.     purchaser. In no case may the cost per disk exceed $6.50.
  329.  
  330.  
  331.  
  332.  
  333.           
  334.                      REGISTRATION AND ORDER FORM 
  335.           
  336.           Stan Peters
  337.           4276-C Wilkie Way
  338.           Palo Alto, Ca.   94306
  339.           ---------------------------------------------------------------
  340.                                                    PRICE       PRICE
  341.           PRODUCT                         QTY      EACH       EXTENDED
  342.           -----------------------------   ---      -----      -------- 
  343.           SPFIND                          ___      $10.00     $_______
  344.  
  345.           
  346.           For Registered users:
  347.           
  348.               Disk with current version   ___       $6.00     $_______
  349.  
  350.  
  351.           Purchase Order (not prepaid)              $5.00     $
  352.                                                                -------
  353.           
  354.           
  355.                                                   SUBTOTAL    $_______
  356.           
  357.           
  358.           California orders, add sales tax (6%)               $
  359.                                                                -------
  360.           
  361.           
  362.                                                    TOTAL      $
  363.                                                                -------
  364.           
  365.           
  366.           Name: _________________________________Phone:________________
  367.           
  368.           Address:_____________________________________________________
  369.           
  370.           Address: ____________________________________________________ 
  371.           
  372.           City, State, Zip: ___________________________________________ 
  373.           
  374.  
  375.  
  376. Comments: